<?php

class Image_Model
{

private $id;   
private $userId;
private $pathToFull;
private $pathToThumb;
private $description;
private $timeCreated; 


    public function __construct(array $arr = null)
    {  
        if (is_array($arr)){
              $prop = $this->getArray();
              foreach($arr  as $k=>$v){
              if (array_key_exists($k, $prop) == true){
                    $this->$k = $v;
                    }
              }
        }   
    }
    
    public function getId()
    {
        return $this->id;
    }
    
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }
    
    public function getUserId()
    {
        return $this->userId;
    }
    
    public function setUserId($UserId)
    {
        $this->userId = $userId;
        return $this;
    }
    
    public function getPathToFull()
    {
        return $this->pathToFull;
    }
    
    public function setPathToFull($pathToFull)
    {
        $this->pathToFull = $pathToFull;
        return $this;
    }
    
    public function getPathToThumb()
    {
        return $this->pathToThumb;
    }
    
    public function setPathToThumb($pathToThumb)
    {
        $this->pathToThumb = $pathToThumb;
        return $this;
    }
    
    public function getDescription()
    {
        return $this->description;
    }
    
    public function setDescription($description)
    {
       $this->description = $description;
       return $this; 
    }
    
    public function getTimeCreated()
    {
        return $this->timeCreated;
    }
    
    public function setTimeCreated($timeCreated)
    {
        $this->timeCreated = $timeCreated;
        return $this;
    }
    
    public function getArray()
    {
        $objArr = get_object_vars($this);
        return $objArr;
    }
}